UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5W0sN6IXK5B+sYAAGwEA2vpzWfiFgugDrgrHoDLD//M='
WHERE
key_id = '5c77e248c9b655575704d286806d8b05e1470ab0adc2397f7fe379c6d9f483cb'
AND (
token = '5W0sN6IXK5B+sYAAGwEA2vpzWfiFgugDrgrHoDLD//M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)