UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'w4UwTDYSjmRFzFCaz6J4CyqSg9jK+3Nte6O0EJQdbuM='
WHERE
key_id = '2dd0228646e468cbcb7fdbc0c37d8d0abb925eded91dfaada124090843eda78f'
AND (
token = 'w4UwTDYSjmRFzFCaz6J4CyqSg9jK+3Nte6O0EJQdbuM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)