UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jR3SEpYOLNIDUPUVFGwDPZsaRnOjuxgBvM3pi0JiO28='
WHERE
key_id = 'efffc63df7e64a4001e47bb3765db93fc126472123e4ec92251a3bb0b9ad4e06'
AND (
token = 'jR3SEpYOLNIDUPUVFGwDPZsaRnOjuxgBvM3pi0JiO28='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)