UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sclMOoOvGg4sS9jn//0CnElFl8xaavVZ1AkQA7duloI='
WHERE
key_id = 'c401f37bc59c27694202467c3ac097a6df99c19216468a014c02a1e10b3045a8'
AND (
token = 'sclMOoOvGg4sS9jn//0CnElFl8xaavVZ1AkQA7duloI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)