UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3HZtpIdv822EBOLg3hD8aXTJTGuvizcKxgqY6tk8TuY=' 
WHERE 
  key_id = '05b55b6a8dd220af2972b64826c20f58f68131616c238e02a1539f499764503e' 
  AND (
    token = '3HZtpIdv822EBOLg3hD8aXTJTGuvizcKxgqY6tk8TuY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033