UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GC2iVFAGSEgobFKtv4p54RtkZHXkYcfx3qkyXIhbZJ8=' 
WHERE 
  key_id = '5b1203e95c45e21c79ac3c206ef4707def33c6c440645edfa261e76909d73c78' 
  AND (
    token = 'GC2iVFAGSEgobFKtv4p54RtkZHXkYcfx3qkyXIhbZJ8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021