UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uC8d/8xfoWd4Kg6yxE245OjiZ9vF33SHADDd+82DQgo=' 
WHERE 
  key_id = '56ed4cd4a08c201014da79cfee91aff0a1ba05be22b3ca1994c610d46a5b85bf' 
  AND (
    token = 'uC8d/8xfoWd4Kg6yxE245OjiZ9vF33SHADDd+82DQgo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017