UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'W+Gkn/5feoWbMcjSVNRrnu7P2W7Jr1S683SNABcywaw='
WHERE
key_id = '3000d7262123389f6fe05eeb61cb14c902e5a6c0f4f66472a32b394d1b30c367'
AND (
token = 'W+Gkn/5feoWbMcjSVNRrnu7P2W7Jr1S683SNABcywaw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)