UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+CLDWAEYJjKpIRJ8szt4HsWN2yNUkCbF1cxOMfekKvs=' 
WHERE 
  key_id = '6839aec75451e3dd26a1422c768cc0510bfe59061f77cc0cd67cf3bd47211d8e' 
  AND (
    token = '+CLDWAEYJjKpIRJ8szt4HsWN2yNUkCbF1cxOMfekKvs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035