UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 's1MqhpDycVsi0a7bQEXbwGgfaHZLPRSsF3QbS59Fvo4=' 
WHERE 
  key_id = '63719a28e1df336143e56a334cbdb0a9a93cc7ba81d3e4b27dfd4e395b2e52f8' 
  AND (
    token = 's1MqhpDycVsi0a7bQEXbwGgfaHZLPRSsF3QbS59Fvo4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032