UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'syRsxEiCFvVh8xsuQSnWiPqklXil9NdoUVDQNLVZiXE=' 
WHERE 
  key_id = '24d86207d18591e258e358906e50d6f52a195d26633b204265cbb4e264e5913a' 
  AND (
    token = 'syRsxEiCFvVh8xsuQSnWiPqklXil9NdoUVDQNLVZiXE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041