UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RAXG4MCW3MUjQCjv0YCX5EV0pyZneAPE/V5/bwttdi0='
WHERE
key_id = '1455cb6b242c019f1500eb295068401c0e50abec95884b992e862c579208f619'
AND (
token = 'RAXG4MCW3MUjQCjv0YCX5EV0pyZneAPE/V5/bwttdi0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)