UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Hhs0Z9se4glpHqqTDa9ymkhPzH8PS4LwoPJsz/dDSOk='
WHERE
key_id = '11361dcbf0dac2467e0de33e48af5d8a0e52b54c666f8dbd29f05d4d85a1d84e'
AND (
token = 'Hhs0Z9se4glpHqqTDa9ymkhPzH8PS4LwoPJsz/dDSOk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)