UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RFh6fLn8It2EqP9I70er22Br3r9QiskrprCBM72Rv1I='
WHERE
key_id = '69ed78347614a9f8c8f701e39aee7c27fb4fd4dedd0a98c38dcf3ff142f7e764'
AND (
token = 'RFh6fLn8It2EqP9I70er22Br3r9QiskrprCBM72Rv1I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)