UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TAJJUsn2P5qJpJA6KG0NmqpOno3uJaWMUtXuoHNcmWo=' 
WHERE 
  key_id = '1526844bbb3bd1a06b6e75dc98c3580e07fc74f98a927cafb0386c01822cec4a' 
  AND (
    token = 'TAJJUsn2P5qJpJA6KG0NmqpOno3uJaWMUtXuoHNcmWo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038