UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '00+6sqAXpEg1GDMbOsGxBRqCmsO/kbBvB5PPlkVfwKA='
WHERE
key_id = '0b713d287ea1cd8e86c8c743684a4dffdcf5fe2fafb0a649cb5673d47d655d9f'
AND (
token = '00+6sqAXpEg1GDMbOsGxBRqCmsO/kbBvB5PPlkVfwKA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)