UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kUWgwzieQM607SrGhZdh4zGla/brlKnz80BaJSOVKDE=' 
WHERE 
  key_id = '28e5e9274281f0ca933cb119ace5bc40d27268219a03e684a2be0f059fa06eff' 
  AND (
    token = 'kUWgwzieQM607SrGhZdh4zGla/brlKnz80BaJSOVKDE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032