UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FfonRtKg6pJVGxXxPcsXiaPV1E8A5f5WSJgifyysUtY='
WHERE
key_id = '2abde0529c4ad79dcc9119f7b2eb4868aec56978d8f67edb9a44f63431834f53'
AND (
token = 'FfonRtKg6pJVGxXxPcsXiaPV1E8A5f5WSJgifyysUtY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)