UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7/1lTwex0K2R00S0X+bTi3zj2V5aPJQlErLT6EZp5aM=' 
WHERE 
  key_id = '73cf2ed4641139b3a1d0fe291bf12c7f8e78ee024422a73ad71b8d18e67f2adc' 
  AND (
    token = '7/1lTwex0K2R00S0X+bTi3zj2V5aPJQlErLT6EZp5aM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036