UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EQuIJ4/ucYbTju8g1yk/Xt9he9MzrKvR1prgmmxjvDE=' 
WHERE 
  key_id = '5d9c3ab86700d59b600c0086aef77fb783c1f73273aec8c0f27567d61b16dd4f' 
  AND (
    token = 'EQuIJ4/ucYbTju8g1yk/Xt9he9MzrKvR1prgmmxjvDE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046