UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LYaD/NF8+o6zYJJNZ450AA1/NKvDGLumJ7AF7vjHe3s=' 
WHERE 
  key_id = 'f6517641ae0fbaa0b96bf250ababe2ad7a0d9dc32fe4254c57dc6f4f22af3c3b' 
  AND (
    token = 'LYaD/NF8+o6zYJJNZ450AA1/NKvDGLumJ7AF7vjHe3s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034