UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'T58T69O4PJXknTaj5K6SfiLG/nsEQt1Bhszi1NLOFNg='
WHERE
key_id = '42c610e47ffe4023f4bbda3edf2a57a71eddc114f640b1dfa25aa28c77774562'
AND (
token = 'T58T69O4PJXknTaj5K6SfiLG/nsEQt1Bhszi1NLOFNg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)