UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HW3WG6BBAiNtsb4m8nHyutLf0aks//4/4+fIMXDkjsI=' 
WHERE 
  key_id = 'cb28e5b08b20370d2bf485f2b15c91bfd465d8293f280c71ba9b843ea192b5b9' 
  AND (
    token = 'HW3WG6BBAiNtsb4m8nHyutLf0aks//4/4+fIMXDkjsI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045