UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/sAHt/VwUeKOt0UnWtHb8MZzF/ZRSpNktJAxjLrkyhY='
WHERE
key_id = 'b26b9fae4067ed7826f94c333cfa8168341d77f96ac83e5c208ce6dfd400e6fa'
AND (
token = '/sAHt/VwUeKOt0UnWtHb8MZzF/ZRSpNktJAxjLrkyhY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)