UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5xNPjUMdwGpGfZn3cuC/JDXI9xxI8n/YzXemVBVxVZY='
WHERE
key_id = '98f4f6681b64a69b724ca1ac1deefc9bbf6bd8b373198aa6245ebfa60698320f'
AND (
token = '5xNPjUMdwGpGfZn3cuC/JDXI9xxI8n/YzXemVBVxVZY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)