UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yqYjDcYWtoOGsprwYIboC/hmlIQ/BdMPlkAOeDJYwIY='
WHERE
key_id = '10803c0aa4a071ac3d3c98f59c3891292c1329ff200cea47a92643d6b08b559e'
AND (
token = 'yqYjDcYWtoOGsprwYIboC/hmlIQ/BdMPlkAOeDJYwIY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)