UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6IGfvaPdjzTb4fWWcfgUViV6uBr+OzI1XfaPdjZRGTM='
WHERE
key_id = '925c18a7879a235c0b9e433878f87695f3646eb0a130861405d0105de63e554a'
AND (
token = '6IGfvaPdjzTb4fWWcfgUViV6uBr+OzI1XfaPdjZRGTM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)