UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+Seact2r1PHlgXZCXgMKuhzM71NFsku82CkMSj5aKOc='
WHERE
key_id = '19dadf4c1dbe75823a3a0c492e6feef3b3edcf696672c0eadf83e663d98b673c'
AND (
token = '+Seact2r1PHlgXZCXgMKuhzM71NFsku82CkMSj5aKOc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)