UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'r+icDLWBCtAcr/vEiMQsuvmPIFDWXoKHrrk2j1nLg3A='
WHERE
key_id = '709066167f593e95bff48feb9fc14587f5e9bf177a3c7f418f4c944579f8b173'
AND (
token = 'r+icDLWBCtAcr/vEiMQsuvmPIFDWXoKHrrk2j1nLg3A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)