UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jYVAEBxQO8BwCAf7rldN28B2nFbhJuHZZX2opp6MmMc='
WHERE
key_id = '7629e03c8c67d76d6c7d60389a870394fe63edd1846058748e6706797a7c2be6'
AND (
token = 'jYVAEBxQO8BwCAf7rldN28B2nFbhJuHZZX2opp6MmMc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)