UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wLh/O3cSjzHcotLqjUs14f+0qK1GejhbLPkbL2Wpr0E=' 
WHERE 
  key_id = '935d2b44ec056d92784f94adbcee71265ef58571e8ca7b834dee3d194092b3de' 
  AND (
    token = 'wLh/O3cSjzHcotLqjUs14f+0qK1GejhbLPkbL2Wpr0E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029