UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HZJaBMeZCXigXysnnk01y9OL4iBysdkI3H5VOHB5hDw=' 
WHERE 
  key_id = 'fc7e047f371c766701dfcb3cae0a0bff6b673c095045a1dc2fbd25ea596ed8d7' 
  AND (
    token = 'HZJaBMeZCXigXysnnk01y9OL4iBysdkI3H5VOHB5hDw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031